﻿
using Newtonsoft.Json;
using System.Collections.Generic;
using XUCore.WeChat.Apis;

namespace XUCore.WeChat.Enterprise.Apis.Group.Statistic
{
    public class GroupStatisticApiResult : ApiResultBase
    {
        /// <summary>
        /// 命中过滤条件的记录总个数
        /// </summary>
        [JsonProperty("total")]
        public int total { get; set; }
        /// <summary>
        /// 当前分页的下一个offset。当next_offset和total相等时，说明已经取完所有
        /// </summary>
        [JsonProperty("next_offset")]
        public int next_offset { get; set; }
        /// <summary>
        /// 记录列表。表示某个群主所拥有的客户群的统计数据
        /// </summary>
        [JsonProperty("items")]
        public List<GroupStatisticResult> items { get; set; }
    }

    public class GroupStatisticResult
    {
        /// <summary>
        /// 群主ID
        /// </summary>
        [JsonProperty("owner")]
        public string owner { get; set; }
        /// <summary>
        /// 详情
        /// </summary>
        [JsonProperty("data")]
        public GroupStatisticDataResult data { get; set; }

    }
    public class GroupStatisticDataResult
    {
        /// <summary>
        /// 新增客户群数量
        /// </summary>
        [JsonProperty("new_chat_cnt")]
        public int new_chat_cnt { get; set; }
        /// <summary>
        /// 截至当天客户群总数量
        /// </summary>
        [JsonProperty("chat_total")]
        public int chat_total { get; set; }
        /// <summary>
        /// 截至当天有发过消息的客户群数量
        /// </summary>
        [JsonProperty("chat_has_msg")]
        public int chat_has_msg { get; set; }
        /// <summary>
        /// 客户群新增群人数。
        /// </summary>
        [JsonProperty("new_member_cnt")]
        public int new_member_cnt { get; set; }
        /// <summary>
        /// 截至当天客户群总人数
        /// </summary>
        [JsonProperty("member_total")]
        public int member_total { get; set; }
        /// <summary>
        /// 截至当天有发过消息的群成员数
        /// </summary>
        [JsonProperty("member_has_msg")]
        public int member_has_msg { get; set; }
        /// <summary>
        /// 截至当天客户群消息总数
        /// </summary>
        [JsonProperty("msg_total")]
        public int msg_total { get; set; }
        /// <summary>
        /// 截至当天新增迁移群数(仅教培行业返回)
        /// </summary>
        [JsonProperty("migrate_trainee_chat_cnt")]
        public int migrate_trainee_chat_cnt { get; set; }

    }
}